class HitchFixModel {
  String? id;
  String? productSn;

  String? deviceId;

  String? scaleFactor;

  String? zeroCompensation;

  String? temperatureCalibration;

  bool? needToWrite;
  bool? isFixed;

  HitchFixModel({
    this.id,
    this.productSn,
    this.deviceId,
    this.scaleFactor,
    this.zeroCompensation,
    this.temperatureCalibration,
    this.needToWrite,
    this.isFixed,
  });

  factory HitchFixModel.fromMap(dynamic map) {
    var temp;
    return HitchFixModel(
      id: map['id']?.toString(),
      productSn: map['productSn']?.toString(),
      deviceId: map['deviceId']?.toString(),
      scaleFactor: map['scaleFactor']?.toString(),
      zeroCompensation: map['zeroCompensation']?.toString(),
      temperatureCalibration: map['temperatureCalibration']?.toString(),
      needToWrite: null == (temp = map['needToWrite'])
          ? null
          : (temp is bool
              ? temp
              : (temp is num
                  ? 0 != temp.toInt()
                  : ('true' == temp.toString()))),
      isFixed: null == (temp = map['isFixed'])
          ? null
          : (temp is bool
              ? temp
              : (temp is num
                  ? 0 != temp.toInt()
                  : ('true' == temp.toString()))),
    );
  }
}
